<template>
  <div>
    <TypeNav />
    <List />
    <Recommend />
    <Rank />
    <Like />
    <Floor v-for="floor in floorList" :key="floor.id" :floor="floor" />

    <Brand />
  </div>
</template>

<script>
import Recommend from "./components/Recommend";
import Rank from "./components/Rank";
import List from "./components/List";
import Like from "./components/Like";
import Floor from "./components/Floor";
import Brand from "./components/Brand";
import { reqGetFloorList } from "@/api";
export default {
  name: "Home",
  components: {
    Recommend,
    Rank,
    List,
    Like,
    Floor,
    Brand,
  },
  data() {
    return {
      floorList: [],
    };
  },
  mounted() {
    this.getFloorList();
  },
  methods: {
    async getFloorList() {
      try {
        const re = await reqGetFloorList();
        this.floorList = re;
      } catch (e) {
        alert(e.message);
      }
    },
  },
};
</script>

<style></style>
